//
//  DayBookModel.h
//  Daybook
//
//  Created by dllo on 16/6/1.
//  Copyright © 2016年 zhangbin. All rights reserved.
//

#import <Realm/Realm.h>

@class DayBook;

// 账本内容的数据模型
@interface Account : RLMObject

@property (nonatomic, strong)NSString *type;

@property (nonatomic, strong)NSString *name;

@property (nonatomic, strong)NSNumber<RLMFloat> *money;

@property (nonatomic, strong)NSNumber<RLMFloat> *income;

@property (nonatomic, strong)NSString *picName;

@property (nonatomic , strong) NSDate *time;

@property (nonatomic, strong)NSString *remarks;

@property (nonatomic, strong)NSData *imageData;

@end
RLM_ARRAY_TYPE(Account) // 定义RLMArray<AccountBook>

// 账本主体的数据模型
@interface DayBook : RLMObject
@property (nonatomic, strong) NSString  *accountBookName;
@property (nonatomic, strong) NSString  *accountBookIndex;

// 通过RLMArray建立关系
@property RLMArray<Account> *bookContent;

@end
RLM_ARRAY_TYPE(DayBook) // 定义RLMArray<DayBook>


